#ifndef _HTTP_H_
#define _HTTP_H_

#define HTTP_URL_SIZE		1024
#define HTTP_VARS_SIZE		4096

//pack decode. return status code > 0, <0 means malform, set headlen & packlen
int http_depack(const char *buf, int buflen, int * headlenp, int * packlenp, int *scodep);
//free the query alloc by http_query_new
int http_query_free(char * query);
//alloc a new query, and must be freeed by the caller!
char * http_query_new(const char * url, const char * vars, int * qlenp);
#endif
